<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

<h:head><p:panel id="titlePanel" header="Creazione di un nuovo hotel"></p:panel></h:head> 
<body> 
	<h:form>	
		<p:panel header="Inserire dati hotel">
			<h:panelGrid columns="3" id="regGrid">
			
				<h:outputLabel for="nome">*Nome:</h:outputLabel>
				<p:inputText id="nome" value="#{hotelBean.hotelDTO.nome}" />
				<p:message for="nome" />
				
				<h:outputLabel for="città">*Città:</h:outputLabel>
				<p:inputText id="città" value="#{hotelBean.hotelDTO.citta}" />
				<p:message for="città" />
				
				<h:outputLabel for="prezzo">*Prezzo:</h:outputLabel>
				<p:inputText id="prezzo" value="#{hotelBean.hotelDTO.prezzo}" />
				<p:message for="prezzo" />
				
			</h:panelGrid>
			
			<p:commandButton value="Crea" update="regGrid" 
				action="#{hotelBean.creazione()}"/>

		</p:panel>
		
	</h:form>
</body>  
</html>
